-- GENERATED SPELL FOR [Flamewaker Priest] --


function spell0_11662(pUnit, Event) --@Dark Mending,Heal--
pUnit:FullCastSpellOnTarget(19775,pUnit)
pUnit:RegisterEvent('Sorts_11662', 2000, 1)
end

function spell1_11662(pUnit, Event) --@Dark Strike,n/a--
pUnit:FullCastSpellOnTarget(19777,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11662', 605, 1)
end

function spell2_11662(pUnit, Event) --@Immolate,n/a--
pUnit:FullCastSpellOnTarget(20294,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11662', 21000, 1)
end

function spell3_11662(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(19776,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11662', 18000, 1)
end

function Sorts_11662(pUnit, Event)
local choix_sorts_11662 = math.random(0, 3)
if choix_sorts_11662 == 0 then
pUnit:RegisterEvent('spell0_11662', 1, 1)
end
if choix_sorts_11662 == 1 then
pUnit:RegisterEvent('spell1_11662', 1, 1)
end
if choix_sorts_11662 == 2 then
pUnit:RegisterEvent('spell2_11662', 1, 1)
end
if choix_sorts_11662 == 3 then
pUnit:RegisterEvent('spell3_11662', 1, 1)
end
end

function mob11662_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11662', math.random(1500, 3000), 1)
end

function mob11662_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11662_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11662_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11662, 1, 'mob11662_Action')
RegisterUnitEvent(11662, 2, 'mob11662_Leave')
RegisterUnitEvent(11662, 3, 'mob11662_Kill')
RegisterUnitEvent(11662, 4, 'mob11662_Die')
